<div class="row">
    <ace-editor ng:model="content" options="{fullScreen: true}">
    </ace-editor>
</div>

<file-dialog
    mode="open"
    ng:show="openDialogVisible"
    on-select="open(path)"
    on-cancel="openDialogVisible = false"
    test-bind="openDialog">
</file-dialog>

<file-dialog
    mode="save"
    ng:show="saveDialogVisible"
    on-select="saveAs(path)"
    on-cancel="saveDialogVisible = false"
    name="saveAsName"
    test-bind="saveDialog">
</file-dialog>

<div class="floating-toolbar-padder"></div>

<floating-toolbar>
    <a href="{{urlPrefix}}/view/notepad" target="_blank" class="btn btn-default btn-flat pull-right">
        <i class="fa fa-plus"></i> <span translate>Tab</span>
    </a>

    <div uib-dropdown class="btn-group dropup pull-right">
        <a class="btn btn-default btn-flat" ng:click="toggleBookmark()" ng:class="{active: bookmarks.indexOf(path) >= 0}" title="{{'Bookmark this'|translate}}" ng:show="path">
            <i class="fa fa-bookmark-o"></i>
        </a>

        <a class="btn btn-default btn-flat" uib-dropdown-toggle ng:show="bookmarks.length > 0">
            <span translate>Bookmarks</span> <span class="caret"></span>
        </a>

        <ul uib-dropdown-menu ng:show="bookmarks.length > 0">
            <li ng:repeat="path in bookmarks|orderBy:'toString()'">
                <a ng:href="{{urlPrefix}}/view/notepad/{{path}}">
                    <i class="fa fa-file"></i> {{path}}
                </a>
            </li>
        </ul>
    </div>

    <a ng:click="newFile()" class="btn btn-default btn-flat" test-bind="newButton" translate>New</a>
    <a ng:click="showOpenDialog()" class="btn btn-default btn-flat" test-bind="openButton" translate>Open</a>
    <a ng:click="save()" ng:show="path" class="btn btn-default btn-flat" test-bind="saveButton" translate>Save</a>
    <a ng:click="showSaveDialog()" class="btn btn-default btn-flat" test-bind="saveAsButton" translate>Save As...</a>
</floating-toolbar>
